<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>出库明细</title>
<meta name="decorator" content="default" />
<style type="text/css">
</style>
<script type="text/javascript">
	$(document).ready(function() {
		$("#contentTable tbody tr").click(function() {
			$("#contentTable tbody tr").removeClass("select_active");
			$(this).addClass("select_active");
		});
	});
</script>
</head>
<body>
	<div class="container">
		<div class="icon-buttons">
			<a data-role="button" data-inline="true" data-icon="back"
				data-iconpos="notext" href="${ctx}/inventory/out">返回</a>
		</div>
		<h2 style="text-align: center;">出库单产品明细</h2>
		<tags:message content="${message}" />
		<div id="details">
			 出库日期：【${fns:formatDate(details[0].storeInventoryOut.outDate,
			'yyyy-MM-dd	HH:mm:ss')}】，出库人：【${inventoryOut.employee.name}】<br />
			<table id="contentTable" data-role="table"
				class="ui-responsive table-stroke">
				<thead>
					<tr>
						<th colspan="7" style="text-align:center;">提货出库明细</th>
					</tr>
					<tr>
						<th>产品渠道</th>
						<th>产品分类</th>
						<th>出库产品</th>
						<th>规格</th>
						<th>零售价</th>
						<th>出库数量</th>
						<th>合计零售价</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${details}" var="storeInventoryOutDetail">
						<tr>
							<c:if
								test="${storeInventoryOutDetail.storeProduct.product_type==0}">
								<td>系统产品</td>
								<td>${
									storeInventoryOutDetail.storeProduct.product.productCategory.name}</td>
								<td>${ storeInventoryOutDetail.storeProduct.product.name}</td>
								<td>${ storeInventoryOutDetail.storeProduct.product.spec}</td>
							</c:if>
							<c:if
								test="${ storeInventoryOutDetail.storeProduct.product_type==1}">
								<td>店面自营</td>
								<td>${
									storeInventoryOutDetail.storeProduct.storeSelfProduct.storeSelfProductCategory.name}</td>
								<td>${
									storeInventoryOutDetail.storeProduct.storeSelfProduct.name}</td>
								<td>${
									storeInventoryOutDetail.storeProduct.storeSelfProduct.spec}</td>
							</c:if>
							<td>${storeInventoryOutDetail.retailPrice}</td>
							<td>${storeInventoryOutDetail.amount}</td>
							<td>${storeInventoryOutDetail.amount*storeInventoryOutDetail.retailPrice}</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
</body>
</html>
